﻿<%@ Page Language="C#" MasterPageFile="~/master/AdminLayout.master" AutoEventWireup="true" CodeFile="shopcategorylist.aspx.cs" Inherits="admin_shopcategorylist" Title="Untitled Page" %>
<%@ Register Src="~/control/common/EmptyGridMessage.ascx" TagPrefix="ucc" TagName="EmptyGridMessage" %>
<%@ Register Assembly="App_Code" Namespace="Pheonix.Fashionzoomer.UI" TagPrefix="ucc" %>

<asp:Content ID="workArea" ContentPlaceHolderID="WorkArea" Runat="Server">
    <table width="95%" style="margin-left:auto;margin-right:auto;" border="0">
        <tr>
            <td colspan="2">
                <ucc:ResponseMessage ID="uccResponseMessage" runat="server" ></ucc:ResponseMessage>
            </td>
        </tr>
        <tr>
            <td style="height:50px;" valign="middle" align="left" colspan="2">
                <h2>Available Shop Categories</h2>
            </td>
        </tr>
        <tr>
            <td align="center" valign="top" colspan="2">
                <asp:GridView ID="shopCategoryList" runat="server" AllowPaging="true" GridLines="None" BorderWidth="0px"
                    AllowSorting="true" AutoGenerateColumns="false" PageSize="10" DataKeyNames="id" OnRowCommand="shopCategoryList_RowCommand" 
                    OnRowDataBound="shopCategoryList_RowDataBound" SkinID="AdminList" >
                    <Columns>
                        <asp:BoundField DataField="category_name" HeaderText="Category Name" SortExpression="category_name" />
                        <asp:ImageField DataImageUrlField="category_image" ControlStyle-Width="80px" ItemStyle-HorizontalAlign="Center"
                             HeaderText="Image" AlternateText="Category Image" NullDisplayText="N/A" ControlStyle-BorderColor="#CCCCCC" 
                             ControlStyle-BorderStyle="Solid" ControlStyle-BorderWidth="1px" />
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                Delete
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:ImageButton ID="deleteButton" AlternateText="delete" ImageUrl="~/image/row_delete.gif"
                                    runat="server" CommandName="deleteCommand" />
                            </ItemTemplate>               
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderTemplate>
                                <asp:CheckBox runat="server" ID="selectAll" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="rowSelect" />
                            </ItemTemplate>                
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <ucc:EmptyGridMessage ID="emptyGridMessage" runat="server" />
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
        <tr><td style="height:40px;" colspan="2">&nbsp;</td></tr>
        <tr>
            <td valign="top" style="width:350px;" align="right">
                <asp:DropDownList ID="ddlCategory" runat="server" AppendDataBoundItems="true" 
                    ValidationGroup="InsertValiation">
                </asp:DropDownList><br />
                <asp:RequiredFieldValidator ID="rqvCategory" runat="server" Display="Dynamic"
                    ErrorMessage="Select a category" ControlToValidate="ddlCategory"
                     SetFocusOnError="true" InitialValue="-1" ValidationGroup="InsertValiation">
                </asp:RequiredFieldValidator>
            </td>
            <td>
                <asp:ImageButton ID="addNewButton" runat="server" SkinID="ListAddNewButton"
                    OnClick="addNewButton_Click" ValidationGroup="InsertValiation"/> &nbsp;
                <asp:ImageButton ID="deleteAllButton" runat="server" SkinID="ListDeleteAllButton"
                    OnClick="deleteAllButton_Click" CausesValidation="false" />
            </td>
        </tr>
        <tr>
            <td align="center" valign="bottom" colspan="2">
                
            </td>
        </tr>
    </table>
</asp:Content>

